﻿using System;

using System.Collections.Generic;
using System.Text;
using Kotonoha.Objects.Model;

namespace Kotonoha.Objects.Selectors {
    public abstract class AbstractOneTimedSelector : IWordSelector {
        protected AbstractOneTimedSelector(Container container) {
            this.container = container;
        }

        protected Container container;
        private bool resolved;
        private Word word;

        public Word Selected { 
            get {
                if (!resolved) {
                    word = resolve();
                    resolved = true;
                }
                return word;
            } 
        }

        protected abstract Word resolve();
    }
}